IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[cms_sp_ContentTypeDelete]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[cms_sp_ContentTypeDelete]
GO

create procedure [dbo].[cms_sp_ContentTypeDelete]
(
	@Id int = null output
)
as
begin
	--todo think about revision, metas
	delete from Contents where ContentTypeId = @Id
	delete from ContentTypes where ContentTypeId = @Id
end

GO


